package com.wctj.api.base.enums;

/**
 * @author: lzg
 * @description: wx 微信 ,app 手机App ,mp 微信公众号, h5 微信小程序
 */
public enum PlatformTypeEnums {
    wx("wx","微信小程序"),
    mp("mp","微信公众号"),
    h5("h5","手机H5"),
    app("app","手机App"),
    web("webinfo","web端"),

    ;

    private String code;
    private String msg;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    PlatformTypeEnums(String code, String message) {

        this.code = code;
        this.msg = message;
    }

    public static PlatformTypeEnums of(String code) {
        for (PlatformTypeEnums plat : PlatformTypeEnums.values()) {
            if (plat.getCode().equals(code)) {
                return plat;
            }
        }
        return PlatformTypeEnums.web;
    }
}

